//
//  ICConstants.h
//  ICome
//
//  Created by zhang_rongwu on 16/3/2.
//  Copyright © 2016年 XianZhuangGuo. All rights reserved.
//


#ifndef ICConstants_h
#define ICConstants_h

// 应用程序的屏幕高度
#define APP_Frame_Height   [[UIScreen mainScreen] bounds].size.height
// 应用程序的屏幕宽度
#define App_Frame_Width    [[UIScreen mainScreen] bounds].size.width
// 提示
#define ALERT(msg)  [[[UIAlertView alloc]initWithTitle:@"提示" message:msg delegate:nil \
cancelButtonTitle:@"确定" otherButtonTitles:nil,nil] show]

#define App_Delegate ((AppDelegate*)[[UIApplication sharedApplication]delegate])
#define App_RootCtr  [UIApplication sharedApplication].keyWindow.rootViewController
#define WEAKSELF __weak typeof(self) weakSelf = self;

#define IOS11_OR_LATER    ( [[[UIDevice currentDevice] systemVersion] compare:@"11.0" options:NSNumericSearch] != NSOrderedAscending )
#define IOS10_OR_LATER    ( [[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending )
#define IOS9_OR_LATER    ( [[[UIDevice currentDevice] systemVersion] compare:@"9.0" options:NSNumericSearch] != NSOrderedAscending )
#define IOS8_OR_LATER    ( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] != NSOrderedAscending )

//判断iPhone5
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size) : NO)

#define GlobalBusy [[NSUserDefaults standardUserDefaults] integerForKey:@"iComGlobalBusy"]
#define isDisdetailVC [[NSUserDefaults standardUserDefaults] boolForKey:@"isDisdetailVC"]

#define SystemVersion [[[UIDevice currentDevice] systemVersion] floatValue]
#define Device [UIDevice currentDevice].model
#define DeviceType [[UIDevice currentDevice] systemName]

#endif

//Library/Caches 文件路径
#define FilePath ([[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil])
//获取temp
#define kPathTemp NSTemporaryDirectory()
//获取沙盒 Document
#define kPathDocument [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]
//获取沙盒 Cache
#define kPathCache [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]









